﻿using ConfExpert.Forms.Base;
using Extensions;
using System;
using System.Data;

namespace ConfExpert.Forms
{
    public partial class Barkodsuz : XForm
    {
        public Barkodsuz(DataTable dt)
        {
            InitializeComponent();

            
            gridView1.Init(dt);
            gridView1.AddSummary();
            gridView1.BestFitColumns();
        }

        private void Barkodsuz_Load(object sender, EventArgs e)
        {
            
            btnOK.ItemClick += btnOK_ItemClick;
        }

        void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridView1.EndEdit();
            this.DialogResult = chkOnay.Checked ? System.Windows.Forms.DialogResult.OK : System.Windows.Forms.DialogResult.Cancel;
        }
    }
}
